﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WorkProcessShow.aspx.cs"
    Inherits="Flow_Info_WorkProcessShow" %>

<%@ Import Namespace="TarreOA.TarreOAModels" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
    <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>
    <style type="text/css">
        <!--
        html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
        scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
        -->
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <br />
    <div>
        <% if (list != null)
           { %>
        <table width="97%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77acd0"
            style="border-collapse: collapse;">
            <tr bgcolor="#b1d5ef">
                <td align="center" colspan="3">
                    流程开始
                </td>
            </tr>
            <% foreach (Flow_WorkProcess fwp in left_list)
               { %>
            <tr>
                <td align="center" width="15%">
                    <font style="font-size: 12px">第<font color="red"><b><%=fwp.Step_id %></b></font>步:</font>
                </td>
                <td width="25%">
                    <font style="font-size: 12px">&nbsp;<%=fwp.Step_name %>
                    </font>
                </td>
                <td width="60%">
                    <font style="font-size: 12px">
                        <% foreach (Flow_WorkProcess fw in list)
                           { %>
                        <% if (fw.Step_id == fwp.Step_id)
                           { %>
                        <font color="red">
                            <%=fw.Prc_user_username %>
                        </font>
                        <% if (fw.Prc_state == 1)
                           { %>
                        <%="未接收"%>
                        <% }
                           else if (fw.Prc_state == 2)
                           { %>
                        <% DateTime start = fw.Start_time; %>
                        <% DateTime finish = DateTime.Now; %>
                        <% TimeSpan result = finish - start; %>
                        <% int hour = 0; %>
                        <% if (result.Days > 0)
                           { %>
                        <% hour = (result.Days * 24); %>
                        <% } %>
                        <% hour += result.Hours; %>
                        [<font color="green"><%="办理中 已用时:" + (hour + "时" + result.Minutes + "分" + result.Seconds + "秒") %></font>]<br />
                        开始于:<%=fw.Start_time.ToString() %>
                        <% }
                           else if (fw.Prc_state == 3)
                           { %>
                        <% DateTime start = fw.Start_time; %>
                        <% DateTime finish = fw.Finish_time; %>
                        <% TimeSpan result = finish - start; %>
                        <% int hour = 0; %>
                        <% if (result.Days > 0)
                           { %>
                        <% hour = (result.Days * 24); %>
                        <% } %>
                        <% hour += result.Hours; %>
                        [<font color="green"><%="已办结 已用时:" + (hour + "时" + result.Minutes + "分" + result.Seconds + "秒") %></font>]<br />
                        开始于:<%=fw.Start_time.ToString() %>&nbsp;结束于:<%=fw.Finish_time.ToString() %>
                        <% } %>
                        <br />
                        <% }
                           } %>
                    </font>
                </td>
            </tr>
            <% } %>
            <tr align="center">
                <td colspan="3">
                    <input id="Button1" onclick="window.history.back()" type="button" class="fanhui_anniu" />
                </td>
            </tr>
        </table>
        <% }
           else
           { %>
        <script type="text/javascript">
            alert("信息加载异常，请重试！");
        </script>
        <% } %>
    </div>
    </form>
</body>
</html>
